<template>
  <view>
    <view class="nav" @click="back">
      <view class="iconfont icon-xiangzuo"></view>
      <text>职位详情</text>
      <view></view>
    </view>
    <view class="bottom">
      <view class="item">
        <view class="iconfont icon-share"></view>
        <text>分享</text>
      </view>
      <view class="item">

        <view class="iconfont icon-shoucang"></view>
        <text>收藏</text>
      </view>

      <view class="connect">
        立即沟通
      </view>
    </view>
    <view class="title">
      <view>{{details.title}}</view>
      <text>15-25k</text>
    </view>
    <view class="condition">
      <view class="iconfont icon-weizhi">
        <text>{{details.place.city}}·{{details.place.district}}·{{details.place.address}}</text>
      </view>
      <view class="iconfont icon-work">
        <text>{{details.workEXP}}</text>
      </view>
      <view class="iconfont icon-xueli">
        <text>{{details.edu}}</text>
      </view>
    </view>
    <view class="boss">
      <view class="boss-info">
        <view class="pic">
          <image src="../../static/logo.png"></image>
        </view>
        <view class="info">
          <view class="name">
            {{details.company.name}}<text>{{details.recruiter.status}}</text>
          </view>
          <view class="company">
            {{details.recruiter.company}}·{{details.recruiter.position}}
          </view>
        </view>
      </view>
      <view class="iconfont icon-right"></view>
    </view>
    <view class="detail">
      <view class="detail-title">
        职位详情
      </view>
      <view class="tags">
        <view class="tag" v-for="item in details.tags">{{item}}</view>
      </view>
      <view class="text-desc">
        {{details.describe}}
      </view>
    </view>
    <view class="boss border-bottom-none">
      <view class="boss-info">
        <view class="pic">
          <image src="../../static/logo.png"></image>
        </view>
        <view class="info">
          <view class="name normal">
            {{details.company.fullName}}
          </view>
          <view class="company">
            {{details.company.industry}}·{{details.company.stage}}·{{details.company.scale}}
          </view>
        </view>
      </view>
      <view class="iconfont icon-right"></view>
    </view>
    <view class="map"></view>
    <view class="tips">
      <view class="iconfont icon-safe">
        <text>BOSS安全提示</text>
      </view>
      <view class="item">
        ·BOSS直聘严禁用人单位做出任何损害求职者合法权益的违法违规行为，包括但不限于扣押求职者证件、收集求职者财物、向求职者集资、让求职者入股、诱导求职者异地入职、异地参加培训等，您一旦发现此类行为，<text
          class="report">请立即举报</text></view>
      <view class="item">·了解更多职场安全防范知识<text class="iconfont icon-right"></text></view>
    </view>

  </view>
</template>

<script>
  export default {
    data() {
      return {
        // 实际数据时根据点击传递id到此处，再请求数据
        details: {
          id: 1,
          title: '前端工程师',
          // 招聘公司的信息
          company: {
            name: "中软国际",
            fullName: '中软国际科技服务有限公司',
            industry: "计算机软件",
            scale: "10000人以上",
            stage: "已上市",
            longitude: "",
            latitude: ""
          },
          describe: '岗位职责：1、从事银行数字化转型核心系统数据应用系统前端界面设计工作。2、使用Vue/React进行前端界面开发和实现。',
          tags: ["前端开发", "HTML", "JavaScript", "HTML5", "ES6", "React", "Angular"],
          workEXP: "3-5年",
          edu: "本科",
          place: {
            city: "成都",
            district: "武侯区",
            address: "新会展中心"
          },
          salary: "15-30k·14薪",
          // 发布者的信息
          recruiter: {
            name: "林女士",
            pic: "",
            position: "招聘主管",
            status: "刚刚活跃",
            company: "中软国际"
          },
        }
      }
    },
    onLoad(option) {},
    methods: {
      back() {
        uni.navigateBack()
      }
    }
  }
</script>

<style lang="scss">
  page {
    width: 680rpx;
    // 84
    padding: 0 35rpx 180rpx;
  }

  .nav {
    width: 680rpx;
    padding-top: 58rpx;
    height: 92rpx;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 34rpx;
    font-weight: bold;
    position: fixed;
    top: var(--window-top);
    z-index: 10;
    background: #FFF;
  }

  .title {
    width: 680rpx;
    padding-top: 150rpx;
    display: flex;
    justify-content: space-between;
    align-content: center;
    font-weight: bold;

    view {
      font-size: 45rpx;
    }

    text {
      width: 120rpx;
      // #ifdef MP-WEIXIN || H5
      width: 140rpx;
      // #endif
      font-size: 30rpx;
      color: $uni-color-primary;
      display: flex;
      align-items: center;
    }
  }

  .condition {
    display: flex;
    flex-wrap: wrap;
    margin-top: 20rpx;

    .iconfont {
      margin-right: 40rpx;
      color: $uni-text-color;

      text {
        margin-left: 10rpx;
        font-size: 28rpx;
      }
    }
  }

  .boss {
    width: 680rpx;
    height: 196rpx;
    margin-top: 50rpx;
    border-top: 1rpx solid #F1F1F1;
    border-bottom: 1rpx solid #F1F1F1;
    display: flex;
    justify-content: space-between;
    align-items: center;

    .boss-info {
      display: flex;

      .pic {
        margin-right: 30rpx;
        width: 98rpx;
        height: 98rpx;
        border-radius: 50%;

        image {
          width: 98rpx;
          height: 98rpx;
          border-radius: 50%;
        }
      }

      .info {
        height: 98rpx;
        display: flex;
        flex-direction: column;
        justify-content: space-between;

        .name {
          font-size: 32rpx;
          font-weight: bold;

          text {
            font-size: 22rpx;
            color: $uni-text-color-grey;
            margin-left: 20rpx;
          }
        }

        .normal {
          font-weight: normal;
        }

        .company {
          font-size: 28rpx;
        }
      }
    }

    .iconfont {
      color: $uni-text-color-grey;
    }
  }

  .detail {
    width: 680rpx;
    margin-top: 52rpx;

    .detail-title {
      font-size: 38rpx;
      font-weight: bold;
    }

    .tags {
      display: flex;
      flex-wrap: wrap;
      margin-top: 34rpx;

      .tag {
        margin-right: 16rpx;
        background-color: $uni-bg-color-grey;
        color: #666;
        padding: 0 20rpx;
        font-size: 28rpx;
        margin-bottom: 20rpx;
      }
    }

    .text-desc {
      font-size: 28rpx;
      color: #666;
    }
  }

  .map {
    width: 680rpx;
    height: 456rpx;
    background: grey;
    border-radius: 20rpx;
  }

  .border-bottom-none {
    border-bottom: none;
  }

  .tips {
    width: 680rpx;
    margin-top: 50rpx;
    padding: 55rpx 0;
    border-top: 1rpx solid #F1F1F1;
    border-bottom: 1rpx solid #F1F1F1;

    .iconfont {
      font-weight: bold;
      font-size: 30rpx;
      color: #558EF7;
      margin-bottom: 10rpx;

      text {
        color: #000;
        margin-left: 10rpx;
      }
    }

    .item {
      color: #666;
      font-size: 26rpx;
      margin-top: 10rpx;
      text-indent: -30rpx;
      padding-left: 30rpx;

      .iconfont {
        color: $uni-text-color-grey;
        font-size: 26rpx;
        margin-left: 20rpx;
      }

      .report {
        color: #5888CF;
        text-decoration: underline;
      }
    }
  }

  .bottom {
    width: 680rpx;
    height: 142rpx;
    padding: 0 35rpx;
    border-top: 1rpx solid #F1F1F1;
    background: #fff;
    position: fixed;
    bottom: var(--window-bottom);
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;

    .connect {
      width: 492rpx;
      height: 84rpx;
      background: $uni-color-primary;
      border-radius: 20rpx;
      color: $uni-text-color-inverse;
      line-height: 84rpx;
      text-align: center;
    }

    .item {
      width: 50rpx;
      text-align: center;

      .iconfont {
        height: 32rpx;
        line-height: 32rpx;
      }

      .icon-share {
        font-size: 32rpx;
      }

      .icon-shoucang {
        font-size: 44rpx;
      }

      text {
        font-size: 24rpx;
      }
    }

  }
</style>
